home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
program
/
ddj0897.zip
/
DYN401.ZIP
/
class
/
shortary.c
< prev
next >
Wrap
C/C++ Source or Header
|
1997-04-16
|
7KB
|
320 lines
/* Copyright (c) 1993-1996 Algorithms Corporation */
/* All rights reserved. */
/* This file automatically generated by dpp - do not edit */
#define DPP_STRATEGY 2
#define DPP_FASTWIDE 0
#line 18 "shortary.d"
#include "array1.h"
#define CLASS ShortArray_c
#define ivType ShortArray_iv_t
#include "generics.h"
object ShortArray_c;
#line 26 "shortary.d"
#define TYPE short
static gIndex_t _index;
cvmeth objrtn ShortArray_cvm_vNew(object self, va_list _rest_)
{
unsigned rank = va_arg(_rest_, unsigned);
#line 34 "shortary.d"
static gNewArray_t cnew = NULL;
MAKE_REST(rank);
if (!cnew)
cnew = cmcPointer(Array, gNewArray);
return cnew(self, AT_SHRT, rank, _rest_);
}
#line 48 "shortary.c"
static objrtn ShortArray_cfm_vNew(object self, ...)
{
va_list _rest_;
va_start(_rest_, self);
return ShortArray_cvm_vNew(self, _rest_);
}
#line 42 "shortary.d"
ivmeth char ShortArray_ivm_vCharValue(object self, va_list _rest_)
{
MAKE_REST(self);
return (char) *((TYPE *) _index(self, _rest_));
}
#line 66 "shortary.c"
static char ShortArray_ifm_vCharValue(object self, ...)
{
va_list _rest_;
va_start(_rest_, self);
return ShortArray_ivm_vCharValue(self, _rest_);
}
#line 48 "shortary.d"
ivmeth short ShortArray_ivm_vShortValue(object self, va_list _rest_)
{
MAKE_REST(self);
return (short) *((TYPE *) _index(self, _rest_));
}
#line 84 "shortary.c"
static short ShortArray_ifm_vShortValue(object self, ...)
{
va_list _rest_;
va_start(_rest_, self);
return ShortArray_ivm_vShortValue(self, _rest_);
}
#line 54 "shortary.d"
ivmeth unsigned short ShortArray_ivm_vUnsignedShortValue(object self, va_list _rest_)
{
MAKE_REST(self);
return (unsigned short) *((TYPE *) _index(self, _rest_));
}
#line 102 "shortary.c"
static unsigned short ShortArray_ifm_vUnsignedShortValue(object self, ...)
{
va_list _rest_;
va_start(_rest_, self);
return ShortArray_ivm_vUnsignedShortValue(self, _rest_);
}
#line 60 "shortary.d"
ivmeth long ShortArray_ivm_vLongValue(object self, va_list _rest_)
{
MAKE_REST(self);
return (long) *((TYPE *) _index(self, _rest_));
}
#line 120 "shortary.c"
static long ShortArray_ifm_vLongValue(object self, ...)
{
va_list _rest_;
va_start(_rest_, self);
return ShortArray_ivm_vLongValue(self, _rest_);
}
#line 66 "shortary.d"
ivmeth double ShortArray_ivm_vDoubleValue(object self, va_list _rest_)
{
MAKE_REST(self);
return (double) *((TYPE *) _index(self, _rest_));
}
#line 138 "shortary.c"
static double ShortArray_ifm_vDoubleValue(object self, ...)
{
va_list _rest_;
va_start(_rest_, self);
return ShortArray_ivm_vDoubleValue(self, _rest_);
}
#line 72 "shortary.d"
ivmeth objrtn ShortArray_ivm_vChangeValue(object self, va_list _rest_)
{ object val = va_arg(_rest_, object);
MAKE_REST(val);
ChkArg(val, 2);
*((TYPE *) _index(self, _rest_)) = gShortValue(val);
return self;
}
#line 158 "shortary.c"
static objrtn ShortArray_ifm_vChangeValue(object self, ...)
{
va_list _rest_;
va_start(_rest_, self);
return ShortArray_ivm_vChangeValue(self, _rest_);
}
#line 80 "shortary.d"
ivmeth objrtn ShortArray_ivm_vChangeCharValue(object self, va_list _rest_)
{ int val = va_arg(_rest_, int);
MAKE_REST(val);
*((TYPE *) _index(self, _rest_)) = (TYPE) val;
return self;
}
#line 177 "shortary.c"
static objrtn ShortArray_ifm_vChangeCharValue(object self, ...)
{
va_list _rest_;
va_start(_rest_, self);
return ShortArray_ivm_vChangeCharValue(self, _rest_);
}
#line 87 "shortary.d"
ivmeth objrtn ShortArray_ivm_vChangeShortValue(object self, va_list _rest_)
{ int val = va_arg(_rest_, int);
MAKE_REST(val);
*((TYPE *) _index(self, _rest_)) = (TYPE) val;
return self;
}
#line 196 "shortary.c"
static objrtn ShortArray_ifm_vChangeShortValue(object self, ...)
{
va_list _rest_;
va_start(_rest_, self);
return ShortArray_ivm_vChangeShortValue(self, _rest_);
}
#line 94 "shortary.d"
ivmeth objrtn ShortArray_ivm_vChangeUShortValue(object self, va_list _rest_)
{ unsigned val = va_arg(_rest_, unsigned);
MAKE_REST(val);
*((TYPE *) _index(self, _rest_)) = (TYPE) val;
return self;
}
#line 215 "shortary.c"
static objrtn ShortArray_ifm_vChangeUShortValue(object self, ...)
{
va_list _rest_;
va_start(_rest_, self);
return ShortArray_ivm_vChangeUShortValue(self, _rest_);
}
#line 101 "shortary.d"
ivmeth objrtn ShortArray_ivm_vChangeLongValue(object self, va_list _rest_)
{ long val = va_arg(_rest_, long);
MAKE_REST(val);
*((TYPE *) _index(self, _rest_)) = (TYPE) val;
return self;
}
#line 234 "shortary.c"
static objrtn ShortArray_ifm_vChangeLongValue(object self, ...)
{
va_list _rest_;
va_start(_rest_, self);
return ShortArray_ivm_vChangeLongValue(self, _rest_);
}
#line 108 "shortary.d"
ivmeth objrtn ShortArray_ivm_vChangeDoubleValue(object self, va_list _rest_)
{ double val = va_arg(_rest_, double);
MAKE_REST(val);
*((TYPE *) _index(self, _rest_)) = (TYPE) val;
return self;
}
#line 253 "shortary.c"
static objrtn ShortArray_ifm_vChangeDoubleValue(object self, ...)
{
va_list _rest_;
va_start(_rest_, self);
return ShortArray_ivm_vChangeDoubleValue(self, _rest_);
}
#line 115 "shortary.d"
static void init_class(void)
{
_index = imcPointer(Array, gIndex);
}
#line 269 "shortary.c"
objrtn ShortArray_initialize(void)
{
static CRITICALSECTION cs;
static int volatile once = 0;
ENTERCRITICALSECTION(_CI_CS_);
if (!once) {
INITIALIZECRITICALSECTION(cs);
once = 1;
}
LEAVECRITICALSECTION(_CI_CS_);
ENTERCRITICALSECTION(cs);
if (ShortArray_c) {
LEAVECRITICALSECTION(cs);
return ShortArray_c;
}
INHIBIT_THREADER;
NumberArray_initialize();
if (ShortArray_c) {
ENABLE_THREADER;
LEAVECRITICALSECTION(cs);
return ShortArray_c;
}
ShortArray_c = gNewClass(Class, "ShortArray", 0, 0, NumberArray, END);
cvMethodFor(ShortArray, vNew, ShortArray_cvm_vNew, ShortArray_cfm_vNew);
ivMethodFor(ShortArray, vCharValue, ShortArray_ivm_vCharValue, ShortArray_ifm_vCharValue);
ivMethodFor(ShortArray, vChangeUShortValue, ShortArray_ivm_vChangeUShortValue, ShortArray_ifm_vChangeUShortValue);
ivMethodFor(ShortArray, vChangeValue, ShortArray_ivm_vChangeValue, ShortArray_ifm_vChangeValue);
ivMethodFor(ShortArray, vLongValue, ShortArray_ivm_vLongValue, ShortArray_ifm_vLongValue);
ivMethodFor(ShortArray, vChangeCharValue, ShortArray_ivm_vChangeCharValue, ShortArray_ifm_vChangeCharValue);
ivMethodFor(ShortArray, vUnsignedShortValue, ShortArray_ivm_vUnsignedShortValue, ShortArray_ifm_vUnsignedShortValue);
ivMethodFor(ShortArray, vChangeDoubleValue, ShortArray_ivm_vChangeDoubleValue, ShortArray_ifm_vChangeDoubleValue);
ivMethodFor(ShortArray, vDoubleValue, ShortArray_ivm_vDoubleValue, ShortArray_ifm_vDoubleValue);
ivMethodFor(ShortArray, vChangeShortValue, ShortArray_ivm_vChangeShortValue, ShortArray_ifm_vChangeShortValue);
ivMethodFor(ShortArray, vChangeLongValue, ShortArray_ivm_vChangeLongValue, ShortArray_ifm_vChangeLongValue);
ivMethodFor(ShortArray, vShortValue, ShortArray_ivm_vShortValue, ShortArray_ifm_vShortValue);
init_class();
ENABLE_THREADER;
LEAVECRITICALSECTION(cs);
return ShortArray_c;
}